package com.cloudkinto.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 充值明细
 * </p>
 *
 * @author ding
 * @since 2020-06-10
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_recharge_record")
public class RechargeRecordDo extends Model<RechargeRecordDo> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.INPUT)
    private Long id;

    /**
     * 充值方式id
     */
    @TableField("recharge_type_id")
    private Long rechargeTypeId;

    /**
     * 充值账户
     */
    @TableField("recharge_account")
    private Long rechargeAccount;

    @TableField("pay_account")
    private String payAccount;

    @TableField("pay_date")
    private Date payDate;
    /**
     * 发票记录id
     */
    @TableField(value = "invoice_record_id",updateStrategy = FieldStrategy.IGNORED)
    private Long invoiceRecordId;

    @TableField("amount_rmb")
    private Double amountRmb;

    @TableField("amount_jpy")
    private Double amountJpy;

    /**
     * 充值前
     */
    @TableField("before_amount")
    private Double beforeAmount;

    /**
     * 充值后余额
     */
    @TableField("after_amount")
    private Double afterAmount;

    /**
     * 备注
     */
    @TableField("tips")
    private String tips;

    /**
     * 审核状态  0 待审核  1充值成功 2充值取消
     */
    @TableField("status")
    private String status;

    @TableField("double_check")
    private Integer doubleCheck;

    @TableField("double_check_time")
    private Date doubleCheckTime;
    /**
     * 充值凭证
     */
    @TableField("certificate_image_file_id")
    private Long certificateImageFileId;

    /**
     * 公司标识
     */
    @TableField("company_id")
    private Long companyId;

    @TableField("jpy_rate")
    private Double jpyRate;

    @TableField("currency")
    private Long currency;
    /**
     * 充值时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 充值时间
     */
    @TableField("create_by")
    private Long createBy;


    @TableField("update_time")
    private Date updateTime;

    /**
     * 入账时间
     */
    @TableField("entry_time")
    private Date entryTime;

    @TableField("entry_type")
    private int entryType;

    /**
     * 入账人
     */
    @TableField("entry_by")
    private Long entryBy;

    @TableField("update_by")
    private Long updateBy;

    /**
     * 删除时间
     */
    @TableField("delete_time")
    private Date deleteTime;

    /**
     * 是否删 除 0否 1是
     */
    @TableLogic
    @TableField("delete_flag")
    private Integer deleteFlag;

    /**
     * 删除时间
     */
    @TableField("delete_by")
    private Long deleteBy;

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
